﻿Imports VN.INS.DL.DALC
Imports VN.INS.BL.BE
Public Class MONITOREOBC
    Public Function Lista_Monitoreo() As DataTable
        Dim objMONITOREODA As MONITOREODA
        Dim objDt As DataTable

        Try
            objMONITOREODA = New MONITOREODA
            objDt = objMONITOREODA.Lista_Monitoreo()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function asig_monitor(ByVal usuario As String) As DataTable
        Dim objMonitoreDA As MONITOREODA
        Dim objDt As DataTable

        Try
            objMonitoreDA = New MONITOREODA
            objDt = objMonitoreDA.asig_monitor(usuario)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function carga_grilla(ByVal strPersona As String, ByVal strCodigo As String, ByVal strAnhioFirma As String) As DataTable
        Dim objMONITOREODA As MONITOREODA
        Dim objDt As DataTable
        Try
            objMONITOREODA = New MONITOREODA
            objDt = objMONITOREODA.carga_grilla(strPersona, strCodigo, strAnhioFirma)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    
    Public Sub corregir_dato(ByVal tc As String, ByVal tg As String, ByVal idptpoa As String)
        Dim objMONITOREODA As MONITOREODA
        Try
            objMONITOREODA = New MONITOREODA
            objMONITOREODA.corregir_dato(tc, tg, idptpoa)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Sub Reactivar_Formato_02_03(ByVal strPoa As String, ByVal StrPeriodo As String)
        Dim objMONITOREODA As MONITOREODA
        Try
            objMONITOREODA = New MONITOREODA
            objMONITOREODA.Reactivar_Formato_02_03(strPoa, StrPeriodo)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub


    Public Sub agrega_proyecto(ByVal IDPER As Integer, ByVal POA As String, ByVal TC As String, ByVal TG As String, ByVal TP As String)
        Dim objMonitoreDA As MONITOREODA
        Try
            objMonitoreDA = New MONITOREODA
            objMonitoreDA.agrega_proyecto(IDPER, POA, TC, TG, TP)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Function buscarGrilla(ByVal Persona As String, ByVal Nombre As String, ByVal pper As String, ByVal periodo As String, ByVal anhio As String) As DataTable
        Dim objMonitorDA As MONITOREODA = New MONITOREODA
        Dim objData As DataTable
        Try
            objData = objMonitorDA.buscarGrilla(Persona, Nombre, pper, periodo, anhio)
            Return objData
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function buscarGrillaAdmin(ByVal strMonitoreador As String, ByVal strNombre As String, ByVal strPPER As String, ByVal periodo As String, ByVal anhio As String) As DataTable
        Dim objMonitorDA As MONITOREODA = New MONITOREODA
        Dim objData As DataTable
        Try
            objData = objMonitorDA.buscarGrillaAdmin(strMonitoreador, strNombre, strPPER, periodo, anhio)
            Return objData
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function tipoProyectoActividad() As DataTable
        Dim objMONITOREODA As MONITOREODA = New MONITOREODA
        Dim objDt As DataTable
        Try
            objDt = objMONITOREODA.tipoProyectoActividad()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function filtrar_asig_monitor(ByVal usuario As String, ByVal periodo As String, ByVal anhio As String) As DataTable
        Dim objMonitoreDA As MONITOREODA
        Dim objDt As DataTable
        Try
            objMonitoreDA = New MONITOREODA
            objDt = objMonitoreDA.filtrar_asig_monitor(usuario, periodo, anhio)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function filtrar_asig_especial(ByVal usuario As String, ByVal anhio As String) As DataTable
        Dim objMonitoreDA As MONITOREODA
        Dim objDt As DataTable
        Try
            objMonitoreDA = New MONITOREODA
            objDt = objMonitoreDA.filtrar_asig_especial(usuario, anhio)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function filtrar_asig_admin(ByVal periodo As String, ByVal anhio As String) As DataTable
        Dim objMonitoreDA As MONITOREODA
        Dim objDt As DataTable
        Try
            objMonitoreDA = New MONITOREODA
            objDt = objMonitoreDA.filtrar_asig_admin(periodo, anhio)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function proyectosmonitor(ByVal usuario As String) As DataTable
        Dim objMonitoreDA As MONITOREODA
        Dim objDt As DataTable
        Try
            objMonitoreDA = New MONITOREODA
            objDt = objMonitoreDA.proyectosmonitor(usuario)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function monitoreadores() As DataTable
        Dim objMonitoreDA As MONITOREODA
        Dim objDt As DataTable
        Try
            objMonitoreDA = New MONITOREODA
            objDt = objMonitoreDA.monitoreadores()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function ppermonitor() As DataTable
        Dim objMonitorDA As MONITOREODA
        Dim objDt As DataTable
        Try
            objMonitorDA = New MONITOREODA
            objDt = objMonitorDA.ppermonitor()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function ppersona() As DataTable
        Dim objMonitorDA As MONITOREODA
        Dim objDtp As DataTable
        Try
            objMonitorDA = New MONITOREODA
            objDtp = objMonitorDA.ppersona()
            Return objDtp
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Sub edicion_grilla(ByVal TC As String, ByVal TG As String, ByVal IDPOA As String)
        Dim objMonitorDA As MONITOREODA
        Try
            objMonitorDA = New MONITOREODA
            objMonitorDA.edicion_grilla(TC, TG, IDPOA)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub edicion_finaciero(ByVal V1 As String, ByVal V2 As String, ByVal V3 As String, ByVal V4 As String, ByVal IDPFP As String)
        Dim objMonitorDA As MONITOREODA
        Try
            objMonitorDA = New MONITOREODA
            objMonitorDA.edicion_finaciero(V1, V2, V3, V4, IDPFP)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub ModificarComentario(ByVal codigo As String, ByVal observacion As String)
        Dim objMonitorDA As MONITOREODA
        Try
            objMonitorDA = New MONITOREODA
            objMonitorDA.ModificarComentario(codigo, observacion)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Function CargarPlan(ByVal Codigo As String) As String
        Dim objMonitorDA As MONITOREODA
        Try
            objMonitorDA = New MONITOREODA
            Return objMonitorDA.CargarPlan(Codigo)
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function ListarProyectos(ByVal strPersona As String, ByVal strAnhioFirma As String) As DataTable
        Dim objMONITOREODA As MONITOREODA
        Dim objDt As DataTable
        Try
            objMONITOREODA = New MONITOREODA
            objDt = objMONITOREODA.ListarProyectos(strPersona, strAnhioFirma)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function InsertarPlanTrabajoPersona(ByVal PM As String, ByVal JI As String, ByVal PD As String, ByVal ES As String) As Integer
        Dim objMonitorDA As MONITOREODA
        Dim idpt As Integer
        Try
            objMonitorDA = New MONITOREODA
            idpt = objMonitorDA.InsertarPlanTrabajoPersona(PM, JI, PD, ES)
        Catch ex As Exception
            Throw ex
        End Try
        Return idpt
    End Function
    Public Sub AgregarRevision(ByVal intIdptp As Integer, ByVal obs As String, ByVal estado As String)
        Dim objMonitoreDA As MONITOREODA
        Try
            objMonitoreDA = New MONITOREODA
            objMonitoreDA.AgregarRevision(intIdptp, obs, estado)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Sub AgregarRevisionInformeMensual(ByVal IntIdInfMensual As Integer, ByVal StrCodPeriodo As String, ByVal StrObsJefe As String, ByVal StrEstado As String)
        Dim objMonitoreDA As MONITOREODA
        Try
            objMonitoreDA = New MONITOREODA
            objMonitoreDA.AgregarRevisionInformeMensual(IntIdInfMensual, StrCodPeriodo, StrObsJefe, StrEstado)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Function CargarPlanJefe(ByVal Codigo As String) As DataTable
        Dim objDt As DataTable
        Dim objMonitorDA As MONITOREODA
        Try
            objDt = New DataTable
            objMonitorDA = New MONITOREODA
            objDt = objMonitorDA.CargarPlanJefe(Codigo)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Sub EliminarPlanTrabajo(ByVal intIdptp As Integer)
        Dim objMonitoreDA As MONITOREODA
        Try
            objMonitoreDA = New MONITOREODA
            objMonitoreDA.EliminarPlanTrabajo(intIdptp)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Function CargarObservacion(ByVal strPersona As String, ByVal strPeriodo As String) As String
        Dim objMonitorDA As MONITOREODA
        Try
            objMonitorDA = New MONITOREODA
            Return objMonitorDA.CargarObservacion(strPersona, strPeriodo)
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function CargarFechaGeneracion(ByVal strPersona As String, ByVal strPeriodo As String) As String
        Dim objMonitorDA As MONITOREODA
        Try
            objMonitorDA = New MONITOREODA
            Return objMonitorDA.CargarFechaGeneracion(strPersona, strPeriodo)
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function CargarFechaAprobacion(ByVal strPersona As String, ByVal strPeriodo As String) As String
        Dim objMonitorDA As MONITOREODA
        Try
            objMonitorDA = New MONITOREODA
            Return objMonitorDA.CargarFechaAprobacion(strPersona, strPeriodo)
        Catch ex As Exception
            Throw ex
        End Try
    End Function
End Class
